import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'logic.dart';

class ShowPage extends StatelessWidget {
  const ShowPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final logic = Get.find<ShowLogic>();
    final state = Get.find<ShowLogic>().state;
    return Scaffold(
      appBar: AppBar(
        title: const Text("展示"),
      ),
      body: SafeArea(
        child: Obx(() {
          return Wrap(
            children: List.generate(
                state.list.length,
                (index) => Padding(
                      padding: const EdgeInsets.all(5),
                      child: SizedBox(
                        width: 20,
                        height: 20,
                        child: Image.network(
                          "${state.list[index].path}",
                          fit: BoxFit.contain,
                        ),
                      ),
                    )),
          );
        }),
      ),
    );
  }
}
